package com.fourforfo.fourmall.auth.vo;

import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Pattern;

@Data
public class UserLoginVO {

    @NotEmpty(message = "用户名必须提交")
    @Length(min=6,max=18,message = "用户名必须是6-18位")
    @Pattern(regexp = "^[A-Za-z].*",message = "用户名必须以字母开头")
    private String loginName;

    @NotEmpty(message = "用户密码不能为空")
    @Length(min=6,max=18,message = "用户密码必须是6-18位")
    private String password;
}
